{tpl head}
<header class="header-fix main-nav bg-black header header-lg navbar navbar-fixed-top-xs box-shadow">
<div class="container">
<div class="navbar-header aside-sm"> <a class="btn btn-link visible-xs" href="javascript:history.back()"> <i class="icon iconfont">&#xf007a;</i> </a>
  <div class="navbar-brand">我的资料 </div><a class="rbtn radius btn-warning" href="{$add}"> 添加 </a>
</div>
</header>
<div class="middle-box loginscreen  animated fadeInDown mt60">
  <div class="m-t">
    <div class="my-list">
      <ul class="pic-news" id="td">
        {loop $list $v}
        <li> <a href="?c=article&a=view&id={$v.id}"> <span class="pic"> <img src="{$v.litpic}" alt=""> </span>
          <div>
            <h3>{$v.title}</h3>
            <p>{function=cn_substr(strip_tags($v.con),100)}</p>
          </div>
          </a> </li>
        {/loop}
      </ul>
    </div>
  </div><a href="javascript:;" id="more" onclick="ViewMore();return false;">上拉或点击查看更多...</a>
</div>
<script type="text/javascript">
  window.page_prev = 1;
  var getTimes = function (times) {
    if (times >= 10000) {
      return parseInt(times / 10000) + "万";
    } else {
      return times;
    }
  }
  function ViewMoreCallback(data) {
    if (data.errorCode == 0) {
      $("#more").html("上拉或点击查看更多...")
      document.getElementById('infocon').appendChild(frag);
    }
  }
  var p=1;
  window.page_temp = 0;
  function ViewMore() {
    if($("#more").text()=='没有了')return false;
    $("#more").html("内容正在加载中...")
    p=p+1;
    $.ajax({
      type: "Get",
      url: "{$ajax}",
      dataType:'json',
      data: "p="+p,
      success: function(msg){
        listDate(msg)
      }
    });
  }

  function listDate(msg){
    var html = '';
    for(var i=0; i<msg.length;i++ )
    {
      html += '<li> <a href="?c=article&a=view&id=';
      html += msg[i].id+'"> <span class="pic">';
      html += '<img src="'+msg[i].litpic+'" alt=""> </span><div><h3>';
      html += msg[i].title;
      html += '</h3><p>';
      html += msg[i].con;
      html +='</p></div></a> </li>';
    };
    if(!msg[0]){
      $("#more").text('没有了');
    }else{
      $('#td').append(html);
      $("#more").html("上拉或点击查看更多...")
    }
  }

</script>
{tpl foot}